package com.zian.domain.dto;


import com.zian.validation.ValidGroup;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;


/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2024-09-08
 */
@Data
public class CarouselDTO {


    @ApiModelProperty("首页轮播图主键id")
    @Null(message = "id必须为空", groups = {ValidGroup.Crud.Create.class})
    @NotNull(message = "id不能为空", groups = {ValidGroup.Crud.Update.class})
    private Integer id;

    @ApiModelProperty("轮播图")
    @NotBlank(message = "轮播图不能为空")
    private String carouselUrl;

    @ApiModelProperty("点击后的跳转地址(默认不跳转)")
    @NotBlank(message = "点击后的跳转地址不能为空")
    private String redirectUrl;

    @ApiModelProperty("排序值(字段越大越靠前)")
    @NotNull(message = "排序值不能为空")
    @Min(value = 0, message = "排序值必须大于0")
    @Max(value = 200, message = "排序值必须小于200")
    private Integer carouselRank;


}
